﻿// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
//
// 本项目主要遵循 MIT 许可证和 Apache 许可证（版本 2.0）进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
//
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动！任何基于本项目二次开发而产生的一切法律纠纷和责任，我们不承担任何责任！

using SqlSugar;
using System.ComponentModel.DataAnnotations;

namespace Admin.NET.Application.Entity;
/// <summary>
/// 流程步骤表
/// </summary>
[Tenant("1300000000001")]
[SugarTable("store_ProcessFlowStep", "流程步骤表")]
public partial class StoreProcessFlowStep : EntityBaseTenantOrgDel
{
    /// <summary>
    /// 入库/出库
    /// </summary>
    [SugarColumn(ColumnName = "FlowType", ColumnDescription = "审批类型")]
    public virtual string FlowType { get; set; }

    /// <summary>
    /// 申请批次
    /// </summary>
    [SugarColumn(ColumnName = "BatchNo", ColumnDescription = "申请批次")]
    public virtual string? BatchNo { get; set; }

    /// <summary>
    /// 申请号
    /// </summary>
    [Required]
    [SugarColumn(ColumnName = "RequestNo", ColumnDescription = "申请号")]
    public virtual string RequestNo { get; set; }

    /// <summary>
    /// 分类Id
    /// </summary>
    [SugarColumn(ColumnName = "StoreTypeId", ColumnDescription = "分类Id")]
    public virtual long? StoreTypeId { get; set; }

    /// <summary>
    /// 分类名称
    /// </summary>
    [SugarColumn(ColumnName = "StoreTypeName", ColumnDescription = "分类名称", Length = 128)]
    public virtual string? StoreTypeName { get; set; }

    /// <summary>
    /// 物资Id
    /// </summary>
    [SugarColumn(ColumnName = "MaterialId", ColumnDescription = "物资Id")]
    public virtual long? MaterialId { get; set; }

    /// <summary>
    /// 物资名称
    /// </summary>
    [SugarColumn(ColumnName = "MaterialName", ColumnDescription = "物资名称", Length = 128)]
    public virtual string? MaterialName { get; set; }

    /// <summary>
    /// 物资当前单价
    /// </summary>
    [SugarColumn(ColumnName = "MaterialPrice", ColumnDescription = "物资单价")]
    public virtual decimal? MaterialPrice { get; set; }

    /// <summary>
    /// 申请数量
    /// </summary>
    [SugarColumn(ColumnName = "Quantity", ColumnDescription = "申请数量")]
    public virtual decimal? Quantity { get; set; }

    /// <summary>
    /// 单位
    /// </summary>
    [SugarColumn(ColumnName = "Unit", ColumnDescription = "单位", Length = 32)]
    public virtual string? Unit { get; set; }

    /// <summary>
    /// 物资总价
    /// </summary>
    [SugarColumn(ColumnName = "MaterialPriceTotal", ColumnDescription = "物资总价")]
    public virtual decimal? MaterialPriceTotal { get; set; }

    /// <summary>
    /// 申请人ID
    /// </summary>
    [Required]
    [SugarColumn(ColumnName = "ApplicantId", ColumnDescription = "申请人ID")]
    public virtual long ApplicantId { get; set; }

    /// <summary>
    /// 申请人姓名
    /// </summary>
    [SugarColumn(ColumnName = "ApplicantName", ColumnDescription = "申请人姓名")]
    public virtual string? ApplicantName { get; set; }

    /// <summary>
    /// 申请人区域
    /// </summary>
    [SugarColumn(ColumnName = "ApplicantDept", ColumnDescription = "申请人区域")]
    public virtual string? ApplicantDept { get; set; }

    /// <summary>
    /// 接收人Id
    /// </summary>
    [SugarColumn(ColumnName = "ReceiverId", ColumnDescription = "接收人Id")]
    public virtual long? ReceiverId { get; set; }

    /// <summary>
    /// 接收人姓名
    /// </summary>
    [SugarColumn(ColumnName = "ReceiverName", ColumnDescription = "接收人姓名")]
    public virtual string? ReceiverName { get; set; }

    /// <summary>
    /// 接收人区域
    /// </summary>
    [SugarColumn(ColumnName = "ReceiverDept", ColumnDescription = "接收人区域")]
    public virtual string? ReceiverDept { get; set; }

    /// <summary>
    /// 申请时间
    /// </summary>
    [SugarColumn(ColumnName = "RequestTime", ColumnDescription = "申请时间")]
    public virtual DateTime? RequestTime { get; set; }

    /// <summary>
    /// 预期时间
    /// </summary>
    [SugarColumn(ColumnName = "ExpectedDate", ColumnDescription = "预期时间")]
    public virtual DateTime? ExpectedDate { get; set; }

    /// <summary>
    /// 完成时间
    /// </summary>
    [SugarColumn(ColumnName = "CompletedTime", ColumnDescription = "完成时间")]
    public virtual DateTime? CompletedTime { get; set; }

    /// <summary>
    /// 新增或更新
    /// </summary>
    [SugarColumn(ColumnName = "StatusNewOrChange", ColumnDescription = "新增或更新")]
    public virtual StatusNewOrChangeEnum StatusNewOrChange { get; set; } = StatusNewOrChangeEnum.Change;

    /// <summary>
    /// 备注
    /// </summary>
    [SugarColumn(ColumnName = "Remark", ColumnDescription = "备注", Length = 128)]
    public virtual string? Remark { get; set; }

    /// <summary>
    /// 审批状态
    /// </summary>
    [SugarColumn(ColumnName = "ApprovalAction", ColumnDescription = "审批状态")]
    public virtual StatusApprovalEnum ApprovalAction { get; set; } = StatusApprovalEnum.Pending;

    /// <summary>
    /// 确认负责人ID
    /// </summary>
    [SugarColumn(ColumnName = "ConfirmerId", ColumnDescription = "确认负责人ID")]
    public virtual long? ConfirmerId { get; set; }

    /// <summary>
    /// 确认负责人姓名
    /// </summary>
    [SugarColumn(ColumnName = "ConfirmerName", ColumnDescription = "确认负责人姓名", Length = 64)]
    public virtual string? ConfirmerName { get; set; }

    /// <summary>
    /// 当前审批步骤（1=第一级审批，2=第二级审批，3=最终执行）
    /// </summary>
    [SugarColumn(ColumnName = "CurrentStep", ColumnDescription = "当前审批步骤")]
    public virtual int CurrentStep { get; set; } = 1;

    /// <summary>
    /// 总审批步骤数
    /// </summary>
    [SugarColumn(ColumnName = "TotalSteps", ColumnDescription = "总审批步骤数")]
    public virtual int TotalSteps { get; set; } = 2;

}
